//
//  DLBView.m
//  MoGuRadio
//
//  Created by dlios on 15/6/10.
//  Copyright (c) 2015年 mogu.com 蘑菇科技. All rights reserved.
//

#import "DLBView.h"

#define DLBVIEW_WIDTH self.bounds.size.width
#define DLBVIEW_HEIGHT self.bounds.size.height

@implementation DLBView


- (instancetype)init
{
    
    self = [super init];
    if (self) {
        
        self.sectionLabel = [[UILabel alloc] initWithFrame:CGRectMake(LBVIEW_WIDTH1 / 25 * kXWidth, - 1 * kYHeight, LBVIEW_WIDTH1 / 2 * kXWidth, 30 * kYHeight)];
        self.sectionLabel.font = [UIFont boldSystemFontOfSize:15];
        self.sectionLabel.textColor = [UIColor whiteColor];
        [self addSubview:self.sectionLabel];
        [_sectionLabel release];
        
        
        self.reverseButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.reverseButton.frame = CGRectMake(110 * kXWidth, - 11 * kYHeight, LBVIEW_WIDTH1 / 2 * kXWidth, 50 * kYHeight);
        self.reverseButton.titleLabel.textColor = [UIColor whiteColor];
        self.reverseButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
        [self addSubview:self.reverseButton];
        
        
        self.shareButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.shareButton.frame = CGRectMake(346 * kXWidth, 3 * kYHeight, LBVIEW_WIDTH1 / 19 * kXWidth, 20 * kYHeight);
        
        UIImage *shareImage = [UIImage imageNamed:@"share@2x.png"];
        shareImage = [shareImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        [self.shareButton setImage:shareImage forState:UIControlStateNormal];
        [self addSubview:self.shareButton];
        
        
        self.lineImageView = [[UIImageView alloc] initWithFrame:CGRectMake(LBVIEW_WIDTH1 / 5, 5 * kYHeight, LBVIEW_WIDTH1 / 13, 17 * kYHeight)];
        [self addSubview:self.lineImageView];
        [_lineImageView release];
        
    }
    
    return self;
}


- (void)dealloc
{
    
    [_lineImageView release];
    [_sectionLabel release];
    [super dealloc];
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
